Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul Sørensen 304 posts 650 karma points
    Jun 07, 2009 @ 12:37
    Paul Sørensen
    0

    [SOLVED] Loading Macro parameter values into a usercontrol


    Hi
    I have created a usercontrol with 3 public properties as described in the videos.
    Now I'm trying to pass values into my usercontrol, but my control does not get the values.

    I've tested it outside umbraco and it works but in my Umbraco installation it does not work.


    DebitorGroup="y"
    LinkText="z" Alias="PBSPayment"
    runat="server">


    Any ideas ?

    Paul S

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jun 07, 2009 @ 12:44
    Peter Dijksterhuis
    0

    Do you have correct casing?
    What if you tried first without the umbraco:item (use static value to test) do you get output then?

    HTH,
    PeterD

  • Paul Sørensen 304 posts 650 karma points
    Jun 07, 2009 @ 15:59
    Paul Sørensen
    0


    Hi PeterD
    I don't get the values for LinkText as well as DebitorGroup into my UC either - I suppose that's what you mean by static values.

    Paul S

  • Paul Sørensen 304 posts 650 karma points
    Jun 07, 2009 @ 16:23
    Paul Sørensen
    0

    Hi
    I have tried on a local installation with all static values and it work fine ??
    I have changed my hosted installation til all static values and it does work ??

    Paul S

  • Paul Sørensen 304 posts 650 karma points
    Jun 07, 2009 @ 17:50
    Paul Sørensen
    0


    Ups a typo
    I have changed my hosted installation til all static values and it does NOT work ??

    BTW - how do I set the values from a property ?
    this does not appear to correct
    PbsId=''

    Paul S

  • Paul Sørensen 304 posts 650 karma points
    Jun 07, 2009 @ 21:56
    Paul Sørensen
    0

    Hi
    Problem solved !

    I spent quiet some time finthe solution so I thought others might be interested in the solution.
    My Usercontrol has 3 properties which I would like to be able to set or change at runtime. On the Document type defining the template I added 3 properties. I my template I made the connection as shown here


    DebitorGroup="[#pbsDebitorGroup]"
    LinkText="[#pbsLinkText]"
    Alias="PBS" runat="server">


    LinkText is a property on the usercontrol and pbsLinkText is the alias for a property in my Document Type.

    I found the special syntax for the property value in the book called Macro Parameter Syntax

    Paul S

Please Sign in or register to post replies

Write your reply to:

Draft